﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Abp.Runtime.Validation;
using MyCompanyName.AbpZeroTemplate.Dto;

namespace MyCompanyName.AbpZeroTemplate.ProductApp.Dto
{
    public class GetProductsInput : PagedAndSortedInputDto, IShouldNormalize
    {
        public string Name { get; set; }
        public decimal? StartPrice { get; set; }

        public decimal? EndPrice { get; set; }
        public int? CategoryId { get; set; }
        public void Normalize()
        {
            if (string.IsNullOrWhiteSpace(Sorting))
            {
                Sorting = "CreationTime";
            }
        }
    }
}
